import 'package:github/server.dart';

class GithubRepo {
  static GithubRepo _instance = GithubRepo._();

  GithubRepo._();

  factory GithubRepo() {
    return _instance;
  }

  GitHub get client => _gitHub;

  GitHub _gitHub;

  void setUserName(String username, String password) {
    var auth = Authentication.basic(username, password);
    _gitHub = createGitHubClient(auth: auth);
  }
}

mixin Repo {
  GithubRepo _githubRepo = GithubRepo();

  GitHub get client => _githubRepo.client;
}
